{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "os.chdir('../')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "from evaluation.evaluate import evaluate\n",
    "from data_utils.basic_data import load_train_val_dataset,load_basic_dataset\n",
    "from results_process.regulizer import remove_nine,remove_short_entity\n",
    "from results_process.utils import load_model_rs\n",
    "from results_process.bert_entity_model import reduce_rs_by_id\n",
    "from functools import reduce\n",
    "import numpy as np\n",
    "from data_utils.bert_multi_class_data import get_train_val_data_loader, get_test_loader,TestEntityDataset\n",
    "import pandas as pd\n",
    "from collections import Counter"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "best_df = pd.read_csv(\"round2/tmp/multi_class_cross1_onround2data_notgoodremoved.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "test_df = load_basic_dataset('test')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "neg_df = best_df[best_df['negative']==1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "nan_df = neg_df[neg_df['key_entity'].map(lambda x:isinstance(x,float))]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>negative</th>\n",
       "      <th>key_entity</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>60</td>\n",
       "      <td>13061</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>380</td>\n",
       "      <td>13381</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>589</td>\n",
       "      <td>13590</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>813</td>\n",
       "      <td>13814</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>878</td>\n",
       "      <td>13879</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>955</td>\n",
       "      <td>13956</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1562</td>\n",
       "      <td>14563</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2334</td>\n",
       "      <td>15335</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2514</td>\n",
       "      <td>15515</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2639</td>\n",
       "      <td>15640</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2996</td>\n",
       "      <td>15997</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>3491</td>\n",
       "      <td>16492</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>3637</td>\n",
       "      <td>16638</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>4066</td>\n",
       "      <td>17067</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>4092</td>\n",
       "      <td>17093</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>4307</td>\n",
       "      <td>17308</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>5814</td>\n",
       "      <td>18816</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>6277</td>\n",
       "      <td>19279</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>6661</td>\n",
       "      <td>19663</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>6851</td>\n",
       "      <td>19853</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>6893</td>\n",
       "      <td>19895</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>8174</td>\n",
       "      <td>21177</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>8210</td>\n",
       "      <td>21213</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>8263</td>\n",
       "      <td>21266</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>8745</td>\n",
       "      <td>21748</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>9361</td>\n",
       "      <td>22365</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>9727</td>\n",
       "      <td>22731</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>9782</td>\n",
       "      <td>22786</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>9890</td>\n",
       "      <td>22894</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         id  negative key_entity\n",
       "60    13061         1        NaN\n",
       "380   13381         1        NaN\n",
       "589   13590         1        NaN\n",
       "813   13814         1        NaN\n",
       "878   13879         1        NaN\n",
       "955   13956         1        NaN\n",
       "1562  14563         1        NaN\n",
       "2334  15335         1        NaN\n",
       "2514  15515         1        NaN\n",
       "2639  15640         1        NaN\n",
       "2996  15997         1        NaN\n",
       "3491  16492         1        NaN\n",
       "3637  16638         1        NaN\n",
       "4066  17067         1        NaN\n",
       "4092  17093         1        NaN\n",
       "4307  17308         1        NaN\n",
       "5814  18816         1        NaN\n",
       "6277  19279         1        NaN\n",
       "6661  19663         1        NaN\n",
       "6851  19853         1        NaN\n",
       "6893  19895         1        NaN\n",
       "8174  21177         1        NaN\n",
       "8210  21213         1        NaN\n",
       "8263  21266         1        NaN\n",
       "8745  21748         1        NaN\n",
       "9361  22365         1        NaN\n",
       "9727  22731         1        NaN\n",
       "9782  22786         1        NaN\n",
       "9890  22894         1        NaN"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "best_df[best_df['id'].isin(nan_df['id'].values)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>title</th>\n",
       "      <th>text</th>\n",
       "      <th>entity</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>29</td>\n",
       "      <td>13061</td>\n",
       "      <td>????#天津爆料# @平安天津：日前，天津警方接到一女子王某报警称：2019年5月10日，...</td>\n",
       "      <td>????#天津爆料# @平安天津：日前，天津警方接到一女子王某报警称：2019年5月10日，...</td>\n",
       "      <td>蚂蚁理财;稳赚</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1292</td>\n",
       "      <td>15640</td>\n",
       "      <td>NaN</td>\n",
       "      <td>去年12月开始，已有网友陆续曝出在线贷提现困难等问题，而今年1月份，有网友发帖指控在线贷出现...</td>\n",
       "      <td>资金链;在线贷;V字迭代</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1477</td>\n",
       "      <td>15997</td>\n",
       "      <td>NaN</td>\n",
       "      <td>12月27日，王丽的手机收到一条图片信息，内容是由于本人在我司借钱快的借款已经严重逾期，且我...</td>\n",
       "      <td>借钱快;借钱;还借钱</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1795</td>\n",
       "      <td>16638</td>\n",
       "      <td>NaN</td>\n",
       "      <td>【钛媒体瞬眼播报】钛媒体10月14日消息，近日，一款谷歌相册的应用上架微软商店，开发者标注为...</td>\n",
       "      <td>gle;钛媒体;GoogleLCC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2021</td>\n",
       "      <td>17067</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2016年2月，美团即上线自有支付服务美团支付，但当月底被实名举报；2016年6月，央行约谈...</td>\n",
       "      <td>小贷;美团支付;钱袋宝</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2032</td>\n",
       "      <td>17093</td>\n",
       "      <td>NaN</td>\n",
       "      <td>(一)民间投融资中介机构非法集资特点</td>\n",
       "      <td>投融资</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2891</td>\n",
       "      <td>18816</td>\n",
       "      <td>团贷的客服昨天下午还给我打电话 今天新闻就爆出来了  翼龙贷4月初 微贷的要8月底到期 祈祷...</td>\n",
       "      <td>团贷的客服昨天下午还给我打电话 今天新闻就爆出来了  翼龙贷4月初 微贷的要8月底到期 祈祷...</td>\n",
       "      <td>觅宝网;翼龙贷</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>3428</td>\n",
       "      <td>19895</td>\n",
       "      <td>NaN</td>\n",
       "      <td>我一直很纳闷，他们卖码卖卡的模式就是典型的非法集资，消费返利是去年被禁止的金融诈骗，这种公司...</td>\n",
       "      <td>kci;小贷;返利;kci小贷</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>4664</td>\n",
       "      <td>22365</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.河南破获特大电信诈骗团伙：虚拟外汇黄金交易平台精心设计圈套[生活]</td>\n",
       "      <td>黄金交易;外汇黄金交易平台;黄金交易平台;虚拟外汇黄金交易平台</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>4868</td>\n",
       "      <td>22731</td>\n",
       "      <td>NaN</td>\n",
       "      <td>老揭辣评：刚看到澎湃新闻的一则报道，说是上海破获一起炒黄金诈骗案，据被害人称，平日自己炒股票...</td>\n",
       "      <td>炒股;炒黄金;大家炒</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>4955</td>\n",
       "      <td>22894</td>\n",
       "      <td>NaN</td>\n",
       "      <td>第一次来福州，人生地不熟的，就在58上找的房子，当时看房子还可以，就租了，押金交了1800，...</td>\n",
       "      <td>会分期;块钱</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>5179</td>\n",
       "      <td>13381</td>\n",
       "      <td>NaN</td>\n",
       "      <td>叱咤创投圈的17岁少女混进了币圈,，骗取价值1.5亿ETH跑路了！</td>\n",
       "      <td>ETH;币圈;创投圈</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>5285</td>\n",
       "      <td>13590</td>\n",
       "      <td>NaN</td>\n",
       "      <td>【钛媒体瞬眼播报】钛媒体11月30日消息，就七年前英国软件公司Autonomy在与惠普并购交...</td>\n",
       "      <td>钛媒体;合创;Autonomy</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>5407</td>\n",
       "      <td>13814</td>\n",
       "      <td>????@平安天津：日前，天津警方接到一女子王某报警称：2019年5月10日，其通过一款名为...</td>\n",
       "      <td>????@平安天津：日前，天津警方接到一女子王某报警称：2019年5月10日，其通过一款名为...</td>\n",
       "      <td>蚂蚁理财;稳赚</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>5446</td>\n",
       "      <td>13879</td>\n",
       "      <td>NaN</td>\n",
       "      <td>女孩乘滴滴遇害案，老百姓对顺风车失去了信心；长春长生问题疫苗事件，老百姓对国产疫苗失去了信心...</td>\n",
       "      <td>共享单车;顺风车;草根投资</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>5481</td>\n",
       "      <td>13956</td>\n",
       "      <td>????#早安，建大#  7月12日，农历六月初十，星期五！  在这里，每天60秒读懂世界！...</td>\n",
       "      <td>????#早安，建大#  7月12日，农历六月初十，星期五！  在这里，每天60秒读懂世界！...</td>\n",
       "      <td>财富中国;中国银行</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>5798</td>\n",
       "      <td>14563</td>\n",
       "      <td>NaN</td>\n",
       "      <td>曾杰：广强律师事务所·金牙大状刑事律师团队(金牙大状律师网)非法集资犯罪辩护与研究中心秘书长...</td>\n",
       "      <td>返利;善心汇</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>6184</td>\n",
       "      <td>15335</td>\n",
       "      <td>????发布了文章 《网贷天眼早报：36金融净利增近十倍 新力金融资金被冻结》  ?????</td>\n",
       "      <td>????发布了文章 《网贷天眼早报：360金融净利增近十倍 新力金融资金被冻结》 http:...</td>\n",
       "      <td>360金融;网贷天眼;新力金融</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>6277</td>\n",
       "      <td>15515</td>\n",
       "      <td>NaN</td>\n",
       "      <td>实体经济受影响相较于O2O等以往被创投圈吹大的互联网泡沫，共享领域的不同在于，这是中国互联网...</td>\n",
       "      <td>共享单车公司;共享单车;创投圈</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>6762</td>\n",
       "      <td>16492</td>\n",
       "      <td>????51信用卡管家跑路了吗，今早9点多我试着提现189元，结果快四个小时了都没到账，以前...</td>\n",
       "      <td>????51信用卡管家跑路了吗，今早9点多我试着提现189元，结果快四个小时了都没到账，以前...</td>\n",
       "      <td>51人品;百信银行;51信用卡;51人品贷</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>7172</td>\n",
       "      <td>17308</td>\n",
       "      <td>NaN</td>\n",
       "      <td>部分在我国境内提供服务的‘外汇交易平台’名为开展‘外汇保证金交易’，实为非法集资或诈骗</td>\n",
       "      <td>外汇交易平台;外汇交易</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>8145</td>\n",
       "      <td>19279</td>\n",
       "      <td>NaN</td>\n",
       "      <td>我在即有分期贷款15000，分期24月，当时我就问可以提前还款吗，他们说可以，提前还款，利息...</td>\n",
       "      <td>有没有;即有分期;贷款1;分期贷</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>8341</td>\n",
       "      <td>19663</td>\n",
       "      <td>NaN</td>\n",
       "      <td>曾今那个叱咤创投圈的17岁少女王凯歆混进了币圈，骗取价值1.5亿ETH跑路了！</td>\n",
       "      <td>ETH;币圈;创投圈</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>8445</td>\n",
       "      <td>19853</td>\n",
       "      <td>????#天津爆料##天津身边事# 日前，天津警方接到一女子王某报警称：2019年5月10日...</td>\n",
       "      <td>????#天津爆料##天津身边事# 日前，天津警方接到一女子王某报警称：2019年5月10日...</td>\n",
       "      <td>蚂蚁理财;稳赚</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>9082</td>\n",
       "      <td>21177</td>\n",
       "      <td>NaN</td>\n",
       "      <td>（猎云网）曝光株洲现奶粉骗局进价仅80元的牦牛奶粉标价684.5元据华声在线报道，近日株洲市...</td>\n",
       "      <td>猎云网;云网</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>9098</td>\n",
       "      <td>21213</td>\n",
       "      <td>NaN</td>\n",
       "      <td>曾今叱咤创投圈的17岁少女混进了币圈，骗取价值1.5亿ETH跑路了</td>\n",
       "      <td>ETH;币圈;创投圈</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>9123</td>\n",
       "      <td>21266</td>\n",
       "      <td>重磅！合肥对15家P2P平台警示风险 13家网贷50多名高管被限制出境           ...</td>\n",
       "      <td>{IMG:1} 提交验收申请的平台，在迎来现场验收的同时，可能接到来自监管部门的反馈意见与...</td>\n",
       "      <td>理财范;富仁金融;博安杰;稳赚;车能贷;稳赚宝;量子金融;惠盈理财;金联储;石头理财;未了财...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>9368</td>\n",
       "      <td>21748</td>\n",
       "      <td>股票配资公司在爆仓以后会跑路吗？VX:miniuf6    QQ: 2529208035 @...</td>\n",
       "      <td>股票配资公司在爆仓以后会跑路吗？VX:miniuf6    QQ: 2529208035 @...</td>\n",
       "      <td>米牛;理财师</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>9882</td>\n",
       "      <td>22786</td>\n",
       "      <td>廊坊燕郊大妈被诈骗分子冒名 工商银行网络贷骗20万</td>\n",
       "      <td>6月13号和6月14号，诈骗分子冒充我妈的名义，通过工商银行的网络方式，贷了2笔各10万元...</td>\n",
       "      <td>网络贷;工商银行</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         id                                              title  \\\n",
       "29    13061  ????#天津爆料# @平安天津：日前，天津警方接到一女子王某报警称：2019年5月10日，...   \n",
       "1292  15640                                                NaN   \n",
       "1477  15997                                                NaN   \n",
       "1795  16638                                                NaN   \n",
       "2021  17067                                                NaN   \n",
       "2032  17093                                                NaN   \n",
       "2891  18816  团贷的客服昨天下午还给我打电话 今天新闻就爆出来了  翼龙贷4月初 微贷的要8月底到期 祈祷...   \n",
       "3428  19895                                                NaN   \n",
       "4664  22365                                                NaN   \n",
       "4868  22731                                                NaN   \n",
       "4955  22894                                                NaN   \n",
       "5179  13381                                                NaN   \n",
       "5285  13590                                                NaN   \n",
       "5407  13814  ????@平安天津：日前，天津警方接到一女子王某报警称：2019年5月10日，其通过一款名为...   \n",
       "5446  13879                                                NaN   \n",
       "5481  13956  ????#早安，建大#  7月12日，农历六月初十，星期五！  在这里，每天60秒读懂世界！...   \n",
       "5798  14563                                                NaN   \n",
       "6184  15335     ????发布了文章 《网贷天眼早报：36金融净利增近十倍 新力金融资金被冻结》  ?????   \n",
       "6277  15515                                                NaN   \n",
       "6762  16492  ????51信用卡管家跑路了吗，今早9点多我试着提现189元，结果快四个小时了都没到账，以前...   \n",
       "7172  17308                                                NaN   \n",
       "8145  19279                                                NaN   \n",
       "8341  19663                                                NaN   \n",
       "8445  19853  ????#天津爆料##天津身边事# 日前，天津警方接到一女子王某报警称：2019年5月10日...   \n",
       "9082  21177                                                NaN   \n",
       "9098  21213                                                NaN   \n",
       "9123  21266  重磅！合肥对15家P2P平台警示风险 13家网贷50多名高管被限制出境           ...   \n",
       "9368  21748  股票配资公司在爆仓以后会跑路吗？VX:miniuf6    QQ: 2529208035 @...   \n",
       "9882  22786                          廊坊燕郊大妈被诈骗分子冒名 工商银行网络贷骗20万   \n",
       "\n",
       "                                                   text  \\\n",
       "29    ????#天津爆料# @平安天津：日前，天津警方接到一女子王某报警称：2019年5月10日，...   \n",
       "1292  去年12月开始，已有网友陆续曝出在线贷提现困难等问题，而今年1月份，有网友发帖指控在线贷出现...   \n",
       "1477  12月27日，王丽的手机收到一条图片信息，内容是由于本人在我司借钱快的借款已经严重逾期，且我...   \n",
       "1795  【钛媒体瞬眼播报】钛媒体10月14日消息，近日，一款谷歌相册的应用上架微软商店，开发者标注为...   \n",
       "2021  2016年2月，美团即上线自有支付服务美团支付，但当月底被实名举报；2016年6月，央行约谈...   \n",
       "2032                                 (一)民间投融资中介机构非法集资特点   \n",
       "2891  团贷的客服昨天下午还给我打电话 今天新闻就爆出来了  翼龙贷4月初 微贷的要8月底到期 祈祷...   \n",
       "3428  我一直很纳闷，他们卖码卖卡的模式就是典型的非法集资，消费返利是去年被禁止的金融诈骗，这种公司...   \n",
       "4664                1.河南破获特大电信诈骗团伙：虚拟外汇黄金交易平台精心设计圈套[生活]   \n",
       "4868  老揭辣评：刚看到澎湃新闻的一则报道，说是上海破获一起炒黄金诈骗案，据被害人称，平日自己炒股票...   \n",
       "4955  第一次来福州，人生地不熟的，就在58上找的房子，当时看房子还可以，就租了，押金交了1800，...   \n",
       "5179                  叱咤创投圈的17岁少女混进了币圈,，骗取价值1.5亿ETH跑路了！   \n",
       "5285  【钛媒体瞬眼播报】钛媒体11月30日消息，就七年前英国软件公司Autonomy在与惠普并购交...   \n",
       "5407  ????@平安天津：日前，天津警方接到一女子王某报警称：2019年5月10日，其通过一款名为...   \n",
       "5446  女孩乘滴滴遇害案，老百姓对顺风车失去了信心；长春长生问题疫苗事件，老百姓对国产疫苗失去了信心...   \n",
       "5481  ????#早安，建大#  7月12日，农历六月初十，星期五！  在这里，每天60秒读懂世界！...   \n",
       "5798  曾杰：广强律师事务所·金牙大状刑事律师团队(金牙大状律师网)非法集资犯罪辩护与研究中心秘书长...   \n",
       "6184  ????发布了文章 《网贷天眼早报：360金融净利增近十倍 新力金融资金被冻结》 http:...   \n",
       "6277  实体经济受影响相较于O2O等以往被创投圈吹大的互联网泡沫，共享领域的不同在于，这是中国互联网...   \n",
       "6762  ????51信用卡管家跑路了吗，今早9点多我试着提现189元，结果快四个小时了都没到账，以前...   \n",
       "7172        部分在我国境内提供服务的‘外汇交易平台’名为开展‘外汇保证金交易’，实为非法集资或诈骗   \n",
       "8145  我在即有分期贷款15000，分期24月，当时我就问可以提前还款吗，他们说可以，提前还款，利息...   \n",
       "8341            曾今那个叱咤创投圈的17岁少女王凯歆混进了币圈，骗取价值1.5亿ETH跑路了！   \n",
       "8445  ????#天津爆料##天津身边事# 日前，天津警方接到一女子王某报警称：2019年5月10日...   \n",
       "9082  （猎云网）曝光株洲现奶粉骗局进价仅80元的牦牛奶粉标价684.5元据华声在线报道，近日株洲市...   \n",
       "9098                  曾今叱咤创投圈的17岁少女混进了币圈，骗取价值1.5亿ETH跑路了   \n",
       "9123   {IMG:1} 提交验收申请的平台，在迎来现场验收的同时，可能接到来自监管部门的反馈意见与...   \n",
       "9368  股票配资公司在爆仓以后会跑路吗？VX:miniuf6    QQ: 2529208035 @...   \n",
       "9882   6月13号和6月14号，诈骗分子冒充我妈的名义，通过工商银行的网络方式，贷了2笔各10万元...   \n",
       "\n",
       "                                                 entity  \n",
       "29                                              蚂蚁理财;稳赚  \n",
       "1292                                       资金链;在线贷;V字迭代  \n",
       "1477                                         借钱快;借钱;还借钱  \n",
       "1795                                  gle;钛媒体;GoogleLCC  \n",
       "2021                                        小贷;美团支付;钱袋宝  \n",
       "2032                                                投融资  \n",
       "2891                                            觅宝网;翼龙贷  \n",
       "3428                                    kci;小贷;返利;kci小贷  \n",
       "4664                    黄金交易;外汇黄金交易平台;黄金交易平台;虚拟外汇黄金交易平台  \n",
       "4868                                         炒股;炒黄金;大家炒  \n",
       "4955                                             会分期;块钱  \n",
       "5179                                         ETH;币圈;创投圈  \n",
       "5285                                    钛媒体;合创;Autonomy  \n",
       "5407                                            蚂蚁理财;稳赚  \n",
       "5446                                      共享单车;顺风车;草根投资  \n",
       "5481                                          财富中国;中国银行  \n",
       "5798                                             返利;善心汇  \n",
       "6184                                    360金融;网贷天眼;新力金融  \n",
       "6277                                    共享单车公司;共享单车;创投圈  \n",
       "6762                              51人品;百信银行;51信用卡;51人品贷  \n",
       "7172                                        外汇交易平台;外汇交易  \n",
       "8145                                   有没有;即有分期;贷款1;分期贷  \n",
       "8341                                         ETH;币圈;创投圈  \n",
       "8445                                            蚂蚁理财;稳赚  \n",
       "9082                                             猎云网;云网  \n",
       "9098                                         ETH;币圈;创投圈  \n",
       "9123  理财范;富仁金融;博安杰;稳赚;车能贷;稳赚宝;量子金融;惠盈理财;金联储;石头理财;未了财...  \n",
       "9368                                             米牛;理财师  \n",
       "9882                                           网络贷;工商银行  "
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test_df[test_df['id'].isin(nan_df['id'].values)]"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
